import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.MalformedURLException;
import java.net.URL;

public class Checker{
	
    public static void main(String[] args){
        try {
        	
        	
			/*	Sets up a file reader to read the file passed on the command
				line one character at a time */
			//FileReader input = new FileReader(args[0]);
        	//FileReader input = new FileReader("GlobalAirportDatabase.txt");
        	FileReader input = new FileReader("database_schema.txt");
            
			/* Filter FileReader through a Buffered read to read a line at a
			   time */
			BufferedReader bufRead = new BufferedReader(input);
			
            String line; 	// String that holds current file line
            
            // Read first line
            line = bufRead.readLine();
            
            // Checks for valid number of apostrophes
            while (line != null){
            	
            	int aposcount = 0;
            	for (int i = 0; i < line.length(); i++){
            		if (line.charAt(i) == '\'') aposcount++;
            	}
            	if (aposcount != 8){
            		System.out.println(line);
            	}
            	
            	line = bufRead.readLine();         
            	
            }
			
        }catch (ArrayIndexOutOfBoundsException e){
            /* If no file was passed on the command line, this expception is
			generated. A message indicating how to the class should be
			called is displayed */
			System.out.println("Usage: java ReadFile filename\n");			

		}catch (IOException e){
			// If another exception is generated, print a stack trace
            e.printStackTrace();
        }
        
    }// end main
    
    

}
